<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>


<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>天津市粮油集团有限公司 OA办公自动化协作平台</title>
		<link href="<%=basePath%>style/css.css" rel="stylesheet" type="text/css" />
		<link href="<%=basePath %>ajaxFramework/ext-2.1/resources/css/ext-all.css" rel="stylesheet" type="text/css" />
		<script type="text/javascript" src="<%=basePath %>ajaxFramework/ext-2.1/adapter/ext/ext-base.js"></script>
	    <script type="text/javascript" src="<%=basePath %>ajaxFramework/ext-2.1/ext-all.js"></script>
	    <script type="text/javascript" src="<%=basePath %>ajaxFramework/ext-2.1/source/locale/ext-lang-zh_CN.js"></script>
		<script type="text/javascript" src="<%=basePath %>/ajaxFramework/jQuery/jquery.js"></script> 
		<script type="text/javascript" src="<%=basePath %>js/common/fileUpload/ajaxfileupload.js"></script>
		<script type="text/javascript" src="<%=basePath %>js/common/fileUpload/ajaxFileZx.js"></script>	
		<script type="text/javascript">
	    	function checksForm(){
	    		var filename = 	$("input[name^=fiid]").val();
	    		$.get("<%=basePath %>tjsinfo/tjsoa/check/check.do?method=varlead",{
	    			'filename':filename
	    		},function(data){
	    			var html = "";
	    			if(data.length> 0){
	    				$(data).each(function(){
	    					html+=this.message+"<br/>";	    					
	    				});
	    				html+="请删除上传的文件，根据错误提示修改后重新上传。"
	    				$("#context").append("");
	    				$("#context").append(html);
	    			}else{
	    				var title = $("input[name=title]").val();
	    				if(title == ''){
	    					  Ext.MessageBox.alert('提示信息', '请填写题目',function(){
									$("input[name=title]").focus();	
							  });		
	    					  
	    					  
	    				}else{
	    					document.infoForm.submit();	
	    				}
	    				
	    			}
	    		},'json')
			}
    	</script>
    	<script type="text/javascript">
			var deleteFile;
			var alreadyUploadFile='';
			var uploadUrl='<%=basePath %>tjsinfo/tjsoa/system/ajaxFileUpload.do?method=uploader';
			var deteleFileUrl='<%=basePath %>tjsinfo/tjsoa/system/ajaxFileUpload.do?method=deleted';
		</script>
	</head>


	<body>
		
		<div id="basic" style="width: 99%">
			
			<!--导航开始处-->
			<div id="index_title">
				<ul>
					<li id="ul_title1" class="over"><a onclick="change(0)" style="cursor:hand"><span>上传领导班子考核评测表</span></a></li>
				</ul>
			</div>
				<form name="infoForm"
					action='<%=basePath%>tjsinfo/tjsoa/check/check.do?method=addLeadCheck' method="post">
					<div id="files" style="display: none;"></div>
					<div id="draft_tab01" class="draft_tab01">
					<table width="100%" border="0" cellspacing="0">
						<tr>
							<td>
								题目：&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
								<input name="title" type="text" id="title" size="80" maxlength="100"/>
							</td>
						</tr>
						<tr>
							 <td><div class="sc_listLong"><ul id="uploadList"></ul></div>
                		 	 上传领导班子考核评测表：&nbsp;<span><input type="file" UNSELECTABLE="on"  name="uploadFile" id="uploadFile" size="34" class="textinput" onchange="ajaxFileUpload()"/>&nbsp;&nbsp;</span></td>
						</tr>
						
						<tr>
							<td>
								<div align="center">
									<a onclick="checksForm()" style="cursor:hand"><img src="<%=basePath %>images/sub_btn.gif" width="72"
											height="17" />
									</a>
								</div>
							</td>
						</tr>
					</table>
					<div id="context"></div>
			</div>
				</form>
			<div class="clear"></div>
		</div>
	</body>
</html>